/**
 * DateHeader - Prints out the date for a bill.
 * 
 * CS575 Software Design
 * Group 6
 * Group Members: Anthony Davidson, Kendra Scheesley, Lyndsey Whitman, Stephen Zakrewsky
 * Date: May 19, 2012
 * Main Author(s): Lyndsey Whitman
 * 
 * Modified: 6/1 Stephen Zakrewsky
 */

package edu.drexel.cs575.a3;

import java.text.DateFormat;
import java.util.Date;
import java.util.Locale;

import edu.drexel.cs575.a3.location.LocaleEnum;
import edu.drexel.cs575.a3.location.Location;
import edu.drexel.cs575.a3.location.LocationProvider;

public class DateHeader extends BillDecorator
{
	public DateHeader(Bill myBill)
	{
		super(myBill);
	}

	public void printBill()
	{
		// A header stating the date
		Location location = LocationProvider.getInstance().getLocation();
		LocaleEnum localeEnum = location.getLocaleEnum();
		Locale locale         = localeEnum.getLocale();

		// Print the date in the Locale's format
		Date todaysDate = new Date();

		DateFormat df   = DateFormat.getTimeInstance(DateFormat.FULL, locale);
		
		display("Date: " + df.format(todaysDate));
		
		super.printBill();
	}
}
	
